# Developed by: Rodrigo Hübner <rhubner@gmail.com>

programas = section1/ section2/crypt/ section2/lufact/ section2/series/ section2/sor/ section2/sparsematmult/ section3/moldyn/ section3/montecarlo/ section3/raytracer/
local = $(shell pwd)

all:
	@for path in ${programas}; do \
		cd $$path; \
		ln -s $(local)/jgfutil .; \
		echo Compilando $$path; \
		javac *.java; \
		cd $(local); \
	done

clean:
	@find . -name *.java~ | xargs rm -f
	@find . -name *.class | xargs rm -f
	@for path in ${programas}; do \
		rm -Rf $$path/jgfutil; \
	done
	
